package ilo;

public class Silvercard extends Card{
    private String cardname ;
    public Silvercard() {}

    public Silvercard(String numble, String name, String telephone, double balance) {
        super(numble, name, telephone, balance);
        this.cardname = "银卡";
    }
    @Override
    public void consume(double money) {
        System.out.println("使用银卡消费");
        if (money>getBalance()){
            System.out.println("余额不足");
        }else {
            setBalance(getBalance()-money);
            System.out.println("消费成功,您的余额为："+getBalance());
        }

    }
}
